<?php
/**
 * The MIT License (MIT)
 * Copyright © 2021 Walkline Wang (https://walkline.wang)
 * https://gitee.com/walkline/online-update-manager
 */	

	session_set_cookie_params(24 * 3600 * 365, '/');
	session_start();

	$page_index = 'index';
	$page_signin = 'signin';

	$page = (!isset($_SESSION['userinfo']) ||
			!isset($_SESSION['userinfo']['username']) ||
			!isset($_SESSION['userinfo']['signature']) ||
			!isset($_SESSION['userinfo']['origin'])) ? $page_signin : $page_index;

	$output = file_get_contents("web/interface/{$page}.html");

	echo $output;
?>